#include "AABoundingBox.h"

AABoundingBox::AABoundingBox(void)
{
	m_position = vector3(0,0,0);
	m_size = vector3(1,1,1);
}
AABoundingBox::~AABoundingBox(void)
{
}
bool AABoundingBox::CollidesWith(const AABoundingBox &other) const
{
	//Just axis aligned collision checks
	if(m_position.x + m_size.x < other.m_position.x)
		return false;
	if(m_position.y + m_size.y < other.m_position.y)
		return false;
	if(m_position.z + m_size.z < other.m_position.z)
		return false;
	if(other.m_position.x + other.m_size.x < m_position.x)
		return false;
	if(other.m_position.y + other.m_size.y < m_position.y)
		return false;
	if(other.m_position.z + other.m_size.z < m_position.z)
		return false;
	return true;
}